package com.calabar.phm.etl.driver.spark.exception;

/**
 * @Author zmc <mingcheng.zhang@cdcalabar.com>
 * @Date 17-6-28 上午10:09
 * @Version v1.0
 * @Des 自定义驱动异常
 */
public class DriverException extends Exception {
    private int code;

    /**
     * @param code    异常码
     * @param message 异常描述
     */
    public DriverException(int code, String message) {
        super(message);
        this.code = code;
    }

    /**
     * @param code    异常码
     * @param message 异常描述
     * @param cause   抛出的异常
     */
    public DriverException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public int getCode() {
        return code;
    }
}
